home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MIDICraft's MIDINET CD-ROM
/
MIDICraft's MIDINET CD-ROM.iso
/
DOSUTILS
/
MIDIDMP.DOC
< prev
next >
Wrap
Text File
|
1996-02-22
|
7KB
|
208 lines
******************************
MIDIDMP v1.2
midi binaries to score dump
by Guenter Nagler
1995
(gnagler@ihm.tu-graz.ac.at)
******************************
[1] BACKGROUND
My Korg i3 has an built-in sequencer that let me edit songs in many ways.
One way is modifying the events of a track directly. Therefore the
sequencer displays the event data sorted by starting time and split into
measures. In some cases this view of music data looks better than viewing
the note on and note off events as the program MIDI2TXT does that I have
written earlier (available from my WWW page).
To write complexer midi programs I needed to sort the midi events anyway.
This program was first used to test the sorted midi output.
Now I use this program to get an overview about the duration and location
of certain notes.
[2] FILES DESCRIPTION
MIDIDMP.EXE.........converter program
MIDIDMP.DOC.........this file, showing usage of MIDIDMP.EXE
MIDIIO.HPP..........header file for a c++ midi parser
MIDIIO.CPP..........source code for a c++ midi parser
MTRACK.HPP..........header file for collecting midi track information
MTRACK.CPP..........source code for collecting midi track information
MIDIDMP.CPP.........c++ source code for midi to text
MIDIDMP.MAK.........make file for project
MIDIDMP.CFG.........compiler options for make
MIDIDMP.PRJ.........project for borland c++ compilers
only MIDIDMP.EXE is required to run program
[3] COPYRIGHT
MIDIDMP (c) 1995 was created by Guenter Nagler.
MIDIDMP is free and may be used as you wish with this one exception:
You may NOT charge any fee or derive any profit for distribution
of MIDIDMP. Thus, you may NOT sell or bundle MIDIDMP with any
product in a retail environment (shareware disk distribution, CD-ROM,
etc.) without permission of the author.
You may give MIDIDMP to your friends, upload it to a BBS, or ftp it to
another internet site, as long as you don't charge anything for it.
[4] DISCLAIMER
MIDIDMP was designed to handle 100% compatible standard midi files.
So I give no guarantees of the results, especially with non 100%
compatible midi files.
If you find a midi file that you think to be 100% compatible midi
that is not correctly converted, please send a sample file to
gnagler@ihm.tu-graz.ac.at .
Use MIDIDMP at your own risk. Anything you do with MIDIDMP is your
responsibility, and not the author's. Any damage caused to any person,
computer, software, hardware, company, or business by running MIDIDMP
is your responsibility, and the author will not be liable.
If you don't understand these terms, or are not sure of something, or
are afraid something bad might come of using MIDIDMP, don't use it!
You are here forewarned.
[5] INSTALLATION
[MSDOS]
Simply copy MIDIDMP.EXE in a directory that is in your path.
When you start the program without arguments
C:\> MIDIDMP
you should get the usage text (see next section)
[UNIX]
compile sources with your C++ compiler (e.g. GNU Compiler g++):
g++ -o mididmp mididmp.cpp midiio.cpp mtrack.cpp
and run program
$ mididmp
[6] USAGE
usage: MIDIDMP [-track [#]][-channel #] file.mid [> file.txt]
The parts in brackets [...] are optional.
The text output is normally written to screen but can be relinked
to a file (> filename.txt) or a printer (> prn). See your MS-DOS/UNIX
manual for usage of > and >> operators.
The program MIDIDMP allows some options:
-track (without following tracknumbers) shows track information
-track # (1 or more track numbers following)
select the tracks that should be dumped. By default all
tracks are dumped.
-channel # (1 or more channel numbers following 1-16)
select the channels that should be dumped. By default all
channels (1-16) are dumped.
[7] A sample of resulting text output
command> mididmp -track sample.mid
Track 1 [NOCHANNEL]: New Song (?)
Track 2 [1]: Track01 (Marcato)
Track 3 [2]: Track02 (SynChiff)
shows the tracks contained in the midi file sample.mid in following form:
Track tracknumber [trackchannel]: tracktitle (trackprogram)
tracknumber is a number between 1 and the number of tracks.
The trackchannel is between 1 and 16 (where channel 10 are drums in general
midi files). The channel is NOCHANNEL when the track does not contain
any notes. It is MULTICHANNEL when the track contains more than one
channels (usually found in format 0 midi files).
The tracktitle is optional and may contain any text (including those without
any sense).
The trackprogram is ? if the track does not set a program (instrument).
It is the name of the first chosen general midi program in this track.
command> mididmp sample.mid
96 units per quarternote
Track 1:
Track 2:
M001 ======= Beat: 4/4
M001 1.00 G4 V064 0.20
M001 1.00 B4 V064 0.20
M001 1.00 E4 V064 0.20
M001 1.72 C5 V064 0.20
M001 1.72 E4 V064 0.20
M001 1.72 A4 V064 0.20
M001 3.00 G4 V064 0.20
M001 3.00 E4 V064 0.20
M001 3.00 B4 V064 0.20
M001 3.72 E4 V064 0.40
M001 3.72 F#4 V064 0.40
M001 3.72 A4 V064 0.40
M002 ======= Beat: 4/4
M002 1.00 G4 V064 0.20
M002 1.00 B4 V064 0.20
M002 1.00 E4 V064 0.20
M002 1.72 A4 V064 0.20
M002 1.72 C5 V064 0.20
M002 1.72 E4 V064 0.20
M002 3.00 G4 V064 0.20
M002 3.00 B4 V064 0.20
Track 3:
M001 ======= Beat: 4/4
M001 TIE C5 V064 2.37
M001 3.48 B4 V064 0.81
M001 4.48 A4 V064 TIE
M002 ======= Beat: 4/4
M002 TIE A4 V064 3.86
The lines containing notes containing following information:
measure location key velocity duration
Each measure is numbered and is formatted by M and leading 0's (e.g. M002).
First line of a measure contains its beat (=tact) (e.g. 4/4, 6/8, ...).
The location is TIE if the note was started in one of the measures before.
Real locations are formated as quarter.remain where 1.000 is the beginning
of a measure and 2.000 the second quarternote in a measure. The remaining
units are relative to units per quarternote value (first output line contains
this value). If this value is 96 then 1.048 this location is 1/8 since
start of current measure.
Keys are named by note name and octave (e.g. G4). G5 is an octave higher
than G4. G#4 is a halve tone higher than G4 and a halve tone lower than A4.
Velocities are values between 0 and 127 and can influence some parameters of
notes (e.g. volume, expression, effect, aftertouch, ...). The values are
formated as V and the value with leading 0's.
Durations are displayed in format quarternotes.remain . These value can
be TIE when the note duration exceeds current beat duration.
1.000 means that the note is played as long as one quarternote (1/4).
The remain value is relative to units per quarternote value as used in
location value.
[8] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
WWW: http://hgiicm.tu-graz.ac.at/Cpub
contains all my dos/unix midi programs
EMAIL: gnagler@ihm.tu-graz.ac.at
[9] CHANGES
v1.0 to v1.1:
* uses module mtrack.cpp to show the track information that is
shown by option -track
v1.1 to v1.2:
* fixed bug with notes duration larger than measure
* improved sorting of notes inside measure.